package cn.jiyun.user.controller;

import cn.jiyun.user.entity.User;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.jiyun.user.service.IUserService;
import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author usian
 * @since 2022-10-25
 */
@RestController
@RequestMapping("/user")
@Api(tags = "登录功能")
@CrossOrigin
public class UserController{

    @Autowired
    private IUserService userService;

    @ApiOperation("用户登录")
    @PostMapping("/login")
    public String login(@RequestBody User user){
        return userService.login(user);
    }

}
